<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			#div1{
				width:100px;
				height:100px;
				border:5px solid red;
				padding:30px;
				margin:10px;
			}
		</style>
		<script>
			window.onload = function(){
				var oDiv = document.getElementById("div1");
				var w = oDiv.offsetWidth;
//				width + padding + border
				var h = oDiv.offsetHeight;
				console.log(w,h);
			}
		</script>
	</head>
	<body>
		<div id="div1">
			123
		</div>
	</body>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
</html>
